package com.yuexunit.finance.project.action.v1.model.output;

import java.math.BigDecimal;

import com.yuexunit.web.annotation.Parameter;

/**
*@version 创建时间：2016年11月9日 上午10:21:53
*@author wenwenlong
*类说明
*/

public class RankingDetail implements Comparable<RankingDetail>{
	@Parameter(name = "detailId", description = "因素ID")
	private Long detailId;
	
	@Parameter(name = "name", description = "排行因素")
	private String name;
	
	@Parameter(name = "value", description = "排行数据")
	private BigDecimal value;

	public Long getDetailId() {
		return detailId;
	}

	public void setDetailId(Long detailId) {
		this.detailId = detailId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public BigDecimal getValue() {
		return value;
	}

	public void setValue(BigDecimal value) {
		this.value = value;
	}

	@Override
	public int compareTo(RankingDetail o) {
		if (this.value.compareTo(o.getValue()) > 0) {
			return -1;
		}
		
		if (this.value.compareTo(o.getValue()) < 0) {
			return 1;
		}
		
		return 0;
	}
}
